﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;

namespace SouDan.Service
{
    [ServiceContract(Namespace = "")]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class Kuaidi100Service
    {
        [OperationContract]
        public string Query(string com, string nu, string show, string muti, string order)
        {
            Kuaidi100ServiceReference.Kuaidi100ServiceClient client = new Kuaidi100ServiceReference.Kuaidi100ServiceClient("default");
            Kuaidi100ServiceReference.Query query = new Kuaidi100ServiceReference.Query();
            query.com = com;
            query.nu = nu;
            query.show = show;
            query.muti = muti;
            query.order = order;

            string result = client.Query(query);
            client.Close();
            return result;
        }
        [OperationContract]
        public string QuickQuery(string com, string nu)
        {
            string show = "0";
            string muti = "1";
            string order = "desc";
            return Query(com, nu, show, muti, order);
        }
    }
}
